/**
 *******************************************************************************
 * @file analog_monitor.h
 * @author .ISS_AUTO (hudandan@issauto.com)
 * @note 2025-05-09  1. 应用于 AK601
 *                      - ADC1: 1. 遥感x2
 *                      - ADC3: 1. VBAT
 *
 * @brief This file is for the analog monitor module.
 *
 * @copyright Copyright (c) 2024 ISSAUTO TECH Co., Ltd. All rights reserved.
 *
 *******************************************************************************
 */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef _ANALOG_MONITOR_TASK_H
#define _ANALOG_MONITOR_TASK_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "main.h"

/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef enum {
    ADC1_CHAN_V0 = 0,
    ADC1_CHAN_V1,

    ADC1_CHAN_MAX_NUM,

} Adc1_Channel_e;

/* ADC1通道总数 */
#define ADC1_CHAN_NUM                   (2U)


typedef enum {
    ADC3_CHAN_VBAT = 0,

    ADC3_CHAN_MAX_NUM,

} Adc3_Channel_e;

/* ADC3通道总数 */
#define ADC3_CHAN_NUM                   (1U)


typedef struct {
    float Cur_Volt1[ADC1_CHAN_NUM];
    float Cur_Volt3[ADC3_CHAN_NUM];

    float Battery_Volt;
    uint32_t Stick_Value[ADC1_CHAN_NUM];   // 垂直摇杆

    uint8_t safetyState;

} analog_paramInfo_t;

/* Exported macro ------------------------------------------------------------*/
/* Exported variables --------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
analog_paramInfo_t *Get_Analog_Monitor_Info(void);
void Analog_Monitor_DeInit(void);
void Analog_Monitor_Init(void);
void Analog_Monitor_Handle(void);


#ifdef __cplusplus
}
#endif

#endif/* _ANALOG_MONITOR_TASK_H */

/* END OF FILE ---------------------------------------------------------------*/
